package erp_services

import (
	"errors"
	"xiehui-service/app/models/erp_models"
	"xiehui-service/global"
)

type tphbService struct {
}

var TphbService = new(tphbService)

// 根据ID查询数据
func (tphbService *tphbService) GetById(tphb_id uint) (tphb erp_models.Tphb, err error) {
	if err = global.App.DB.First(&tphb, tphb_id).Error; err != nil {
		err = errors.New("未查询到信息")
		return erp_models.Tphb{}, err
	}

	return tphb, nil
}
